let bookArray = [
    {code: 1, name: "人间失格", writer: "太宰治", price: 10, date: "2007年10月"},
    {code: 2, name: "月亮与六便士", writer: "毛姆", price: 18, date: "1999年10月"},
    {code: 3, name: "我是猫", writer: "夏目漱石", price: 25, date: "2010年10月"},
    {code: 4, name: "浮生六记", writer: "沈复", price: 20, date: "1897年10月"},
    {code: 5, name: "云边有个小卖部", writer: "张嘉佳", price: 28, date: "2011年10月"},
    {code: 6, name: "遥远的向日葵地", writer: "李娟", price: 22, date: "2015年10月"},
    {code: 7, name: "慢煮生活", writer: "汪曾祺", price: 12, date: "2012年10月"},
    {code: 8, name: "人性的弱点", writer: "卡耐基", price: 5, date: "2002年10月"}
];

let cartArray = [
    {code: 1, name: "人间失格", price: 10, num: 3},
    {code: 4, name: "浮生六记", price: 20, num: 2},
    {code: 7, name: "慢煮生活", price: 12, num: 1}
];